<!DOCTYPE html>
<html>
<head>@@include('../common/header.html',{"title":"角色管理"})
@@include('../common/ztree.html')
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">
		<div class="content-wrapper ml0">
			<section class="content-header">
				<h1>角色管理</h1>
				<ol class="breadcrumb">
					<li><a href="#"><i class="fa fa-dashboard"></i>系统管理</a></li>
					<li class="active">角色管理</li>
				</ol>
			</section>
			<section class="content container-fluid">
				<div class="box box-primary">
					<div class="box-body">
						<form class="form-inline" way-scope="model.search">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="名称"
									name="name" way-data="name" maxlength="50">
							</div>
							<div class="form-group">
								<select class="form-control" name="dataScope" way-data="dataScope" >
											<option value="">请选择数据范围</option>
											<option value="0">全部</option>
											<option value="1">本部门及以下</option>
											<option value="2">本部门</option>
											<option value="3">本人</option>
											<option value="4">自定义部门</option>
								</select>
							</div>
							<button type="button" class="btn btn-default sf-permission-ctl" id="search" data-sf-permission="sys:role:qry">
								<i class="fa fa-search"></i>
							</button>
							<div class="btn-group pull-right">
								<button type="button" class="btn btn-primary sf-permission-ctl" id="add" data-sf-permission="sys:role:save">
									<i class="fa fa-plus"></i>
								</button>
								<button type="button" class="btn btn-info sf-permission-ctl" id="edit" data-sf-permission="sys:role:update">
									<i class="fa fa-edit"></i>
								</button>
								<button type="button" class="btn btn-danger sf-permission-ctl" id="delete" data-sf-permission="sys:role:delete">
									<i class="fa fa-trash-o"></i>
								</button>
							</div>
						</form>
					</div>
				</div>
				<div class="box">
					<div class="box-body">
						<!-- table -->
						<table id="table"></table>
					</div>
				</div>
			</section>
		</div>
	</div>
	<!-- 添加与修改start -->
	<div class="modal fade" id="form-panel" way-scope="model.form">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" way-data="title" way-html="true"></h4>
				</div>
				<form class="form-horizontal" way-scope="data" id="data-form">
					<div class="modal-body">
						<input type="hidden" way-data="id" name="id">
						<div class="form-group">
							<label class="col-sm-2 control-label">名称<font
								class="text-red">*</font></label>
							<div class="col-sm-5">
								<input type="text" class="form-control" way-data="name"
									name="name" placeholder="" maxlength="50" minlength="1"
									required>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">数据范围</label>
							<div class="col-sm-5">
									<select class="form-control" name="dataScope" way-data="dataScope"  id="data-scope-select">
										<option value="0">全部</option>
										<option value="1">本部门及以下</option>
										<option value="2">本部门</option>
										<option value="3">本人</option>
										<option value="4">自定义部门</option>
									</select>
									<p class="help-block text-red">用户如果多个角色，数据范围自动取并集</p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">备注</label>
							<div class="col-sm-10">
								<textarea class="form-control" rows="3" way-data="remarks"
									name="remarks" maxlength="255"></textarea>
							</div>
						</div>
						<div class="form-group">
							<div class="group">
								<label class="col-sm-2 control-label">权限</label>
								<div class="col-sm-3 pd10">
									<ul id="menuTree" class="ztree">
									</ul>
								</div>
							</div>
							<div class="group undisplay" id="dept-wrapper" >
								<label class="col-sm-2 control-label">部门</label>
								<div class="col-sm-3 pd10">
									<ul id="deptTree" class="ztree">
									</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default pull-left"
							data-dismiss="modal">
							<i class="fa fa-times"></i> 取消
						</button>
						<button type="submit" class="btn btn-primary">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</form>
			</div>
		</div>
	</div>
	<!-- 添加与修改end -->
	@@include('../common/common-js.html')
	<script src="/admin/js/sys/role.js"></script>
</body>
</html>